package cn.com.guage.dtm.stat.service.impl;

import java.util.List;
import cn.com.guage.dtm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.guage.dtm.stat.mapper.StatDataCoverDetailMapper;
import cn.com.guage.dtm.stat.domain.StatDataCoverDetail;
import cn.com.guage.dtm.stat.service.IStatDataCoverDetailService;
import cn.com.guage.dtm.common.core.text.Convert;

/**
 * 覆盖度分析详情Service业务层处理
 * 
 * @author yangdechao
 * @date 2021-07-22
 */
@Service
public class StatDataCoverDetailServiceImpl implements IStatDataCoverDetailService 
{
    @Autowired
    private StatDataCoverDetailMapper statDataCoverDetailMapper;

    /**
     * 查询覆盖度分析详情
     * 
     * @param coverDetailId 覆盖度分析详情ID
     * @return 覆盖度分析详情
     */
    @Override
    public StatDataCoverDetail selectStatDataCoverDetailById(Long coverDetailId)
    {
        return statDataCoverDetailMapper.selectStatDataCoverDetailById(coverDetailId);
    }

    /**
     * 查询覆盖度分析详情列表
     * 
     * @param statDataCoverDetail 覆盖度分析详情
     * @return 覆盖度分析详情
     */
    @Override
    public List<StatDataCoverDetail> selectStatDataCoverDetailList(StatDataCoverDetail statDataCoverDetail)
    {
        return statDataCoverDetailMapper.selectStatDataCoverDetailList(statDataCoverDetail);
    }

    /**
     * 新增覆盖度分析详情
     * 
     * @param statDataCoverDetail 覆盖度分析详情
     * @return 结果
     */
    @Override
    public int insertStatDataCoverDetail(StatDataCoverDetail statDataCoverDetail)
    {
        statDataCoverDetail.setCreateTime(DateUtils.getNowDate());
        return statDataCoverDetailMapper.insertStatDataCoverDetail(statDataCoverDetail);
    }

    /**
     * 修改覆盖度分析详情
     * 
     * @param statDataCoverDetail 覆盖度分析详情
     * @return 结果
     */
    @Override
    public int updateStatDataCoverDetail(StatDataCoverDetail statDataCoverDetail)
    {
        statDataCoverDetail.setUpdateTime(DateUtils.getNowDate());
        return statDataCoverDetailMapper.updateStatDataCoverDetail(statDataCoverDetail);
    }

    /**
     * 删除覆盖度分析详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteStatDataCoverDetailByIds(String ids)
    {
        return statDataCoverDetailMapper.deleteStatDataCoverDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除覆盖度分析详情信息
     * 
     * @param coverDetailId 覆盖度分析详情ID
     * @return 结果
     */
    @Override
    public int deleteStatDataCoverDetailById(Long coverDetailId)
    {
        return statDataCoverDetailMapper.deleteStatDataCoverDetailById(coverDetailId);
    }
}
